<template>
  <el-form
    ref="form"
    :model="form"
    label-width="120px"
    class="modifyForm">
    <el-form-item
      label="是否需要培训"
      prop="train">
      <el-select
        v-model="form.train"
        placeholder="请选择">
        <el-option
          v-for="item in trainOptions"
          :key="item.value"
          :label="item.label"
          :value="item.value"/>
      </el-select>
    </el-form-item>
    <el-form-item
      label="是否需要背调"
      prop="backTune">
      <el-select
        v-model="form.backTune"
        placeholder="请选择">
        <el-option
          v-for="item in trainOptions"
          :key="item.value"
          :label="item.label"
          :value="item.value"/>
      </el-select>
    </el-form-item>
    <el-form-item class="modify-form-button-list">
      <el-button
        type="default"
        @click="reset">取消</el-button>
      <el-button
        type="primary"
        @click="search">确定</el-button>
    </el-form-item>

  </el-form>
</template>
<script>
export default {
  name: 'ModifyForm',
  data () {
    return {
      form: {
        train: '',
        backTune: ''
      },
      trainOptions: [{
        value: '是',
        label: '是'
      }, {
        value: '否',
        label: '否'
      }],
      backTuneOptions: [{
        value: '是',
        label: '是'
      }, {
        value: '否',
        label: '否'
      }]
    }
  },
  methods: {
    search () {
      this.$emit('search')
    },
    reset () {
      this.$refs['form'].resetFields()
    }
  }
}
</script>
<style scoped lang="less">

</style>
